﻿using System;
using ModelLayer;

namespace ControllerLayer.Dijkstras
{
    public class ReachableNode : IComparable<ReachableNode>
    {
        private Node _n;

        public ReachableNode(Node n, Edge e)
        {
            _n = n;
            Edge = e;
        }

        public double TotalCost
        {
            get { return _n.TotalCost; }
        }

        public Node Node
        {
            get { return _n; }
            set { _n = value; }
        }

        public Edge Edge { get; set; }

        public int CompareTo(ReachableNode rn)
        {
            return Node.TotalCost.CompareTo(rn.Node.TotalCost);
        }
    }
}